package com.aaa.stat.service.impl;

import com.aaa.entity.BBusinessInfo;

import com.aaa.stat.dao.BBusinessInfoDao;
import com.aaa.stat.service.BBusinessInfoService;
import com.aaa.stat.vo.BBusinessInfoVo;
import com.aaa.stat.vo.UserAndBinfoVo;
import com.aaa.vo.Result;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BBusinessInfoServiceImpl extends ServiceImpl<BBusinessInfoDao, BBusinessInfo> implements BBusinessInfoService {

   @Autowired
   private BBusinessInfoDao businessInfoDao;

    @Override
    public Result<List<BBusinessInfoVo>> findAllNameAndMoney() {

        List<BBusinessInfoVo> nameAndMoney = businessInfoDao.findNameAndMoney();
        return new Result<>(2000,"统计成功",nameAndMoney);
    }

    @Override
    public Result<List<UserAndBinfoVo>> findAllUserAndBusinessInfo() {
        List<UserAndBinfoVo> userAndBinfoVos = businessInfoDao.UserAanBinfo();
        return new Result<>(2000,"统计成功",userAndBinfoVos);
    }
}
